#pragma once


class Primitive;
struct DrawPrimitiveCall
{
	Ogre::Pass* Pass;
	float Distance;
	unsigned char Arg[4];
	Primitive* SrcPrim;
};


class Primitive
{
public:

	virtual void Draw( DrawPrimitiveCall const& , Ogre::Camera* camera) = 0;

};


enum EPrimitiveSort
{
	PS_None,
	PS_Material,
	PS_Far,
	PS_Near,
};


struct DrawPrimitiveGroup
{
	DrawPrimitiveGroup();

	EPrimitiveSort mSortFunc;
	bool mIs2D;

	void Draw( Ogre::Camera* cam);

	void Push( DrawPrimitiveCall const& dp);

	void Sort();

	TArray< DrawPrimitiveCall> mDpList;
};
